package com.xishu.entity.activity;


import com.xishu.annotation.dao.DefaultValue;
import com.xishu.annotation.dao.Search;
import com.xishu.annotation.valid.UniqueName;
import com.xishu.entity.AbstractEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;

@Entity(name = "activity")
@Data
@Table
public class Activity extends AbstractEntity implements Serializable {


    private static final long serialVersionUID = -4719296751323872590L;
    @ApiModelProperty(value = "活动标题")
    @UniqueName
    private String tittle;

    @ApiModelProperty(value = "活动主办方信息")
    private String organizersInfo;

    @ApiModelProperty(value = "活动状态")
    private Integer status;

    @ApiModelProperty(value = "商店id")
    private Long shopId;

    @ApiModelProperty(value = "活动联系人")
    private String associateName;

    @ApiModelProperty(value = "活动联系人电话")
    private String phone;
    @ApiModelProperty(value = "活动地点")
    private String place;

    @ApiModelProperty(value = "活动上限人数")
    private Integer persons;

    @ApiModelProperty(value = "已报名人数")
    private Integer participants;

    @ApiModelProperty(value = "归属的餐厅公司")
    @Transient
    private Long companyId;

    @ApiModelProperty(value = "餐厅名")
    @Transient
    private String companyName;

    @ApiModelProperty(value = "截至日期")
    private Long deadline;

    @ApiModelProperty(value = "截至日期")
    private String deadlineDate;

    @Transient
    @ApiModelProperty(value = "分店名")
    private String shopName;

    @ApiModelProperty(value = "分店名")
    @Transient
    private String shopName_zh;

    @ApiModelProperty(value = "分店名")
    @Transient
    private String shopName_en;

    @ApiModelProperty(value = "活动描述")
    private String introduction;

    @ApiModelProperty(value = "活动细则")
    private String rules;

    @ApiModelProperty(value = "开始时间")
    private Long startTime;

    @ApiModelProperty(value = "开始时间")
    private String startDate;

    @ApiModelProperty(value = "结束时间")
    private Long endTime;

    @ApiModelProperty(value = "活动点赞数量")
    @DefaultValue(defaultValue = "0")
    private Integer likeCount;
}
